﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 依赖倒置原则._2
{
    public interface ISongWords
    {
        public string GetSongWords();
    }

    public class ChineseSong2: ISongWords
    {
        public string GetSongWords()
        {
            return "中国歌曲";
        }
    }
    public class EnglishSong2 : ISongWords
    {
        public string GetSongWords()
        {
            return "外国歌曲";
        }
    }

    public class Singer2
    {
        public void SingSong(ISongWords songWords)
        {
            Console.WriteLine($"歌手正在唱{songWords.GetSongWords()}");
        }
    }
}
